<?php


/**
 * Notes:
 * PROJECT_NAME : ERP v1.8 重构erp
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2024/6/4
 * Time: 14:21
 */

namespace app\service\traits\model\lines;

use app\company\model\DeliverCar;
use app\company\model\DeliverDriver;
use app\company\model\DeliverDriverAccountLog;
use app\company\model\DeliverDriverWithdraw;
use app\company\model\DeliverLine;
use think\model\relation\BelongsTo;
use think\model\relation\HasMany;
use think\model\relation\HasOne;

/**
 * 物流部分
 * Trait Deliver
 * @property  DeliverLine $deliverLine
 * @property  DeliverLine $deliverLineO
 * @property  DeliverLine $deliverLines
 * @property  DeliverDriver $deliverDriver
 * @property  DeliverDriver $deliverDriverO
 * @property  DeliverDriver $deliverDrivers
 * @property  DeliverCar $deliverCar
 * @property  DeliverCar $deliverCarO
 * @property  DeliverCar $deliverCars
 * @property  DeliverDriverAccountLog $deliverDriverAccountLog
 * @property  DeliverDriverAccountLog $deliverDriverAccountLogO
 * @property  DeliverDriverAccountLog $deliverDriverAccountLogs
 * @property  DeliverDriverWithdraw $deliverDriverWithdraw
 * @property  DeliverDriverWithdraw $deliverDriverWithdrawO
 * @property  DeliverDriverWithdraw $deliverDriverWithdraws
 */
trait Deliver
{
    /**
     * 物流-路线
     * @return belongsTo
     */
    public function deliverLine(): belongsTo
    {
        return $this->belongsTo(DeliverLine::class);
    }

    /**
     * 物流-路线
     * @return hasMany
     */
    public function deliverLines(): hasMany
    {
        return $this->hasMany(DeliverLine::class);
    }

    /**
     * 物流-路线
     * @return hasOne
     */
    public function deliverLineO(): hasOne
    {
        return $this->hasOne(DeliverLine::class);
    }


    /**
     * 物流-司机
     * @return belongsTo
     */
    public function deliverDriver(): belongsTo
    {
        return $this->belongsTo(DeliverDriver::class);
    }

    /**
     * 物流-司机
     * @return hasMany
     */
    public function deliverDrivers(): hasMany
    {
        return $this->hasMany(DeliverLine::class);
    }

    /**
     * 物流-司机
     * @return hasOne
     */
    public function deliverDriverO(): hasOne
    {
        return $this->hasOne(DeliverDriver::class);
    }

    /**
     * 物流-车辆
     * @return belongsTo
     */
    public function deliverCar(): belongsTo
    {
        return $this->belongsTo(DeliverCar::class);
    }

    /**
     * 物流-车辆
     * @return hasMany
     */
    public function deliverCars(): hasMany
    {
        return $this->hasMany(DeliverCar::class);
    }

    /**
     * 物流-车辆
     * @return hasOne
     */
    public function deliverCarO(): hasOne
    {
        return $this->hasOne(DeliverCar::class);
    }


    /**
     * 物流-司机账户-变动明细
     * @return belongsTo
     */
    public function deliverDriverAccountLog(): belongsTo
    {
        return $this->belongsTo(DeliverDriverAccountLog::class);
    }

    /**
     * 物流-司机账户-变动明细
     * @return hasMany
     */
    public function deliverDriverAccountLogs(): hasMany
    {
        return $this->hasMany(DeliverDriverAccountLog::class);
    }

    /**
     * 物流-司机账户-变动明细
     * @return hasOne
     */
    public function deliverDriverAccountLogO(): hasOne
    {
        return $this->hasOne(DeliverDriverAccountLog::class);
    }

    /**
     * 物流-司机账户-提现明细
     * @return belongsTo
     */
    public function deliverDriverWithdraw(): belongsTo
    {
        return $this->belongsTo(DeliverDriverWithdraw::class);
    }

    /**
     * 物流-司机账户-提现明细
     * @return hasMany
     */
    public function deliverDriverWithdraws(): hasMany
    {
        return $this->hasMany(DeliverDriverWithdraw::class);
    }

    /**
     * 物流-司机账户-提现明细
     * @return hasOne
     */
    public function deliverDriverWithdrawO(): hasOne
    {
        return $this->hasOne(DeliverDriverWithdraw::class);
    }


}